<template>
    <Welcome 
        :name="name" 
        :logo="logo"
        @like="onLike"
    />
    <Button/>
</template>

<script setup>

import Button from './app/Button.view' ;

import {
    get
} from 'zbee-module' ;

import {
    ref,
    onMounted
} from 'vue' ;

import axios from 'zbee-axios' ;

import Message from './message' ;

function onLike(){

    Message({
        message:'谢谢点赞',
        type:'success'
    }) ;
}

const {
    default:Welcome
} = get('zbee-starter-component') ;

const name = ref() ;

const logo = ZBEE_ENV_LOGO ;

onMounted(async () => name.value = await axios({
    url:'/services/name'
})) ;

</script>